package excercise;

public class EX01_Q21 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		int a = 7000; //연봉
		boolean s = true; //결혼 유무
		if(s = true){if (a < 3000) System.out.println("tax = " + (a*0.1F) );
		                 else System.out.println("tax ="+ (a*0.25F));}
		else { if(a < 6000) System.out.println("tax = " + (a*0.1F));
		           else System.out.println("tax ="+ (a*0.25F));
		}
		
		//#22
		int thisYear = 2013;
		
		if (thisYear % 4 == 0 && thisYear % 100 != 0 || thisYear % 400 == 0 )
		{System.out.println("윤년이에요~");} else System.out.println("아니에요~");
		
	    int e = 3;
	    e = e++;
	    if (e==3)System.out.println('a');
	    else {System.out.println('d');}
	   
		// #30
	    System.out.println("                  Muletiplication Table");
		System.out.println("           1      2       3       4       5       6       7       8       9");
		System.out.println("----------------------------------------------------------------------------");
		System.out.println("1  |       1      2       3       4       5       6       7       8       9");
		
		for (int i = 1; i<=9; ++i){
			if(i==1)System.out.print(i+"  |");
			System.out.print("       "+i);
		}
		System.out.println();
		for (int i = 1; i<=9; ++i){
			if(i==1)System.out.print(i*2+"  |");
			System.out.print("       "+i*2);
		}
		System.out.println();
		for (int i = 1; i<=9; ++i){
			if(i==1)System.out.print(i*3+"  |");
			System.out.print("       "+i*3);
		}
		System.out.println();
		for (int i = 1; i<=9; ++i){
			if(i==1)System.out.print(i*4+"  |");
			System.out.print("       "+i*4);
		}
		System.out.println();
		for (int i = 1; i<=9; ++i){
			if(i==1)System.out.print(i*5+"  |");
			System.out.print("       "+i*5);
		}
		System.out.println();
		for (int i = 1; i<=9; ++i){
			if(i==1)System.out.print(i*6+"  |");
			System.out.print("       "+i*6);
		}
		System.out.println();
		for (int i = 1; i<=9; ++i){
			if(i==1)System.out.print(i*7+"  |");
			System.out.print("       "+i*7);
		}
		System.out.println();
		for (int i = 1; i<=9; ++i){
			if(i==1)System.out.print(i*8+"  |");
			System.out.print("       "+i*8);
		}
		System.out.println();
		for (int i = 1; i<=9; ++i){
			if(i==1)System.out.print(i*9+"  |");
			System.out.print("       "+i*9);
		}
		// 위에 방법도 있지만 아래 방법이 편하다.
		System.out.println();
		for( int j = 1; j <= 9; ++j ){
		    for (int i = 1; i <= 9; ++i){
			if(i == 1)System.out.print((i*j)+"  |");
			System.out.print("\t"+(i*j));}
		// /t는 약 7칸 띄운것과 같다.
		System.out.println();
		
		}
		}

}
